﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OnlineSupports.aspx.cs" Inherits="Web.Cms.OnlineSupports.OnlineSupports" Theme="Default" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>
<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
<%@ Register TagPrefix="cc1" Namespace="AWS.FilePicker" Assembly="FilePickerControl" %>      

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>        
    <link href="/App_Themes/Default/Style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 61px;
        }
    </style>
    <script type="text/javascript">
        function numbersonly(myfield, e, dec) {
            var key;
            var keychar;

            if (window.event)
                key = window.event.keyCode;
            else if (e)
                key = e.which;
            else
                return true;
            keychar = String.fromCharCode(key);

            // control keys
            if ((key == null) || (key == 0) || (key == 8) || (key == 9) || (key == 13) || (key == 27))
                return true;

            // numbers
            else if ((("0123456789").indexOf(keychar) > -1))
                return true;

            // decimal point jump
            else if (dec && (keychar == ".")) {
                myfield.form.elements[dec].focus();
                return false;
            } else
                return false;
        }
</script>
</head>
<body>
    <form id="form1" runat="server">    
        <table border="0" cellpadding="3" cellspacing="6" width="100%">                                            
            <tr><td align="center" colspan="5" valign="top"><asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="true" ForeColor="red" Font-Size="11px"></asp:Label></td></tr>
            <tr><td style="height:5px;" colspan="5"></td></tr>           
            <tr><td align="center" colspan="5" valign="top"><asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Size="12px" Text="QUẢN LÝ HỖ TRỢ ONLINE"></asp:Label></td></tr>
            <tr><td style="height:5px;" colspan="5"></td></tr>
            <tr>
                <td align="left"><b>Tên Người Hỗ Trợ</b></td>
                <td align="left" class="style1"><asp:TextBox runat="server" ID="txtTitle" 
                        Height="17" Width="300"></asp:TextBox>
                    <asp:RequiredFieldValidator Font-Bold="true" ForeColor="red" Font-Size="11px" ID="rpTitle" runat="server" ErrorMessage="Bạn không được để trống" ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
                </td>               
            </tr>   
            <tr>
                <td align="left"><b>Email</b></td>
                <td align="left" class="style1"><asp:TextBox runat="server" ID="txtEmail" Height="17" Width="300"></asp:TextBox>
                    
                    <asp:RegularExpressionValidator ID="revEmail" runat="server" Font-Size="11px" ForeColor="red"
                        ErrorMessage="Email không hợp lệ!" ControlToValidate="txtEmail" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                    
                    <asp:RequiredFieldValidator ID="rpemail" runat="server" Font-Size="11px" ForeColor="red"
                        ErrorMessage="Bạn không được để trống" ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                    
                </td>
                <td style="width:10px;"></td>
                <td align="left"><b>Phone</b></td>
                <td align="left">
                  <asp:TextBox runat="server" ID="txtPhone" Height="17" Width="125" MaxLength="11" onkeypress="return numbersonly(this, event)"></asp:TextBox>
<%--                    <asp:RangeValidator ID="rvPhone" runat="server" Font-Size="11px" ForeColor="red"
                        ErrorMessage="Bạn nhập đúng định dạng điện thoại" ControlToValidate="txtPhone" 
                        MaximumValue="11" MinimumValue="0"></asp:RangeValidator>--%>
                    <asp:RequiredFieldValidator ID="rpPhone" runat="server" Font-Size="11px" ForeColor="red" ErrorMessage="Bạn không được để trống" ControlToValidate="txtPhone"></asp:RequiredFieldValidator>
                </td> 
            </tr>   
            <tr>
                <td align="left"><b>NickName</b></td>
                <td align="left" class="style1">
                    <asp:TextBox runat="server" ID="txtNickName" Height="17" Width="300"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rpNickname" runat="server" Font-Size="11px" ForeColor="red" ErrorMessage="Bạn không được để trống" ControlToValidate="txtNickName"></asp:RequiredFieldValidator>
                </td>
                <td style="width:10px;"></td>
                <td align="left"><b>Yahoo</b></td>
                <td align="left">
                  <asp:TextBox runat="server" ID="txtYahoo" Height="17" Width="125"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="rpYahoo" runat="server" Font-Size="11px" ForeColor="red" ErrorMessage="Bạn không được để trống" ControlToValidate="txtYahoo"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="left"><b>SupportType</b></td>
                <td align="left" class="style1">
                    <asp:DropDownList runat="server" ID="dropSupportType" Width="140">
                        <asp:ListItem Value="1" Selected="True">Yahoo</asp:ListItem>
                        <asp:ListItem Value="2">Skype</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="width:10px; margin-left:170px"></td>
                <td align="left"><b>Sky</b></td>
                <td align="left">
                  <asp:TextBox runat="server" ID="txtSky" Height="17" Width="125"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left"><b>Mobile</b></td>
                <td align="left" class="style1">
                  <asp:TextBox runat="server" ID="txtMobile" Height="17px" Width="136px" MaxLength="12" onkeypress="return numbersonly(this, event)"></asp:TextBox>
<%--                    <asp:RangeValidator ID="rvMobile" runat="server" Font-Size="11px" ForeColor="red"
                        ErrorMessage="Bạn nhập đúng định dạng điện thoại" ControlToValidate="txtMobile" 
                        MaximumValue="11" MinimumValue="0"></asp:RangeValidator>--%>
                    <asp:RequiredFieldValidator ID="rpMobile" runat="server" Font-Size="11px" ForeColor="red" ErrorMessage="Bạn không được để trống" ControlToValidate="txtMobile"></asp:RequiredFieldValidator>
                </td>
                <td style="width:10px;"></td>
                <td align="left"><b>Priority</b></td>
                <td align="left">
                    <asp:DropDownList runat="server" ID="dropPriority" Width="130">
                        <asp:ListItem Value="1" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="2"></asp:ListItem>
                        <asp:ListItem Value="3"></asp:ListItem>
                        <asp:ListItem Value="4"></asp:ListItem>
                        <asp:ListItem Value="5"></asp:ListItem>
                        <asp:ListItem Value="6"></asp:ListItem>
                        <asp:ListItem Value="7"></asp:ListItem>
                        <asp:ListItem Value="8"></asp:ListItem>
                        <asp:ListItem Value="9"></asp:ListItem>
                        <asp:ListItem Value="10"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>                           
            <%--            <tr>
                <td align="left"><b>Ảnh</b></td>
                <td align="left">
                    <cc1:FilePicker ID="txtImage" runat="server" fpPopupURL="/FilePicker/FilePicker.aspx"
                    Width="200px" Height="17" fpAllowedUploadFileExts="doc,jpg,gif,png,jpeg,rar,zip,ppt,pptx,xls,xlsx" CssClass="input" fpUploadDir ="/Uploads/singer"></cc1:FilePicker>                    
                </td>  
                <td style="width:10px;"></td>
                <td align="left"><b>Ngày sinh</b></td>
                <td align="left">                  
                    <radCln:RadDateTimePicker ID="txtBirthDay" runat="server"></radCln:RadDateTimePicker>
                </td>              
            </tr>--%>
            <tr>
                <td><b>Mô Tả<b></td>
            </tr>
            <tr>
                <td colspan="6" >
                    <CE:Editor AutoConfigure="Minimal" ID="txtDescription" runat="server" 
                       style="width:700px;" >
                    </CE:Editor> 
                </td>
            </tr>
            <tr><td colspan="5" style="height:5px;"></td></tr>
            <tr style="display:none;">
                <td align="left"><b> Một số lựa chọn</b></td>
                <td align="left" colspan="4">
                    <asp:CheckBox ID="chbox" runat="server" Text="Checkbox" />                    
                </td>            
            </tr>                      
            <tr>
                <td style="height: 30px"></td>
                <td align="left" style="height: 30px" colspan="4" >                                                         
                    <asp:LinkButton ID="btnAdd" runat="server" SkinID="admin-ButtonInsert" onclick="btnAdd_Click" style="margin-left:250px"/>  
                    <asp:LinkButton ID="btnUpdate" runat="server" SkinID="admin-ButtonUpdate"  onclick="btnUpdate_Click" style="margin-left:250px"/>
                </td>    
            </tr>          
        </table>       
    
    </form>
</body>
</html>